home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
rjs.lha
/
RJS
/
Transport
/
tests
/
iclient.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-14
|
562b
|
35 lines
#include <iostream.h>
#include <stdio.h>
#include <osfcn.h>
#include <libc.h>
#include "RJS/Transport.h"
char buffer[10];
void Transport_Test(Transport &server)
{
server.read(buffer,6); // read from server
cout << "Transport client: read ==> '" << buffer << "'" << endl;
server.write("goodbye",8);
}
int main(int argc, char *argv[])
{
if (argc!=3) {
cerr << "usage: " << argv[0] << " server port" << endl;
exit(1);
}
InetStream server;
server.socket_client(InetAddress(argv[1],atoi(argv[2])));
Transport_Test(server);
exit(0);
}